package com.siwei.eqi.controller;

import com.siwei.eqi.pojo.ResultBean;
import com.siwei.eqi.pojo.vo.BatchResultVO;
import com.siwei.eqi.pojo.vo.DeliveryTaskBatchInfoVO;
import com.siwei.eqi.pojo.vo.SubtaskInfoVO;
import com.siwei.eqi.pojo.vo.SubtaskVO;
import com.siwei.eqi.service.IDeliveryTaskBatchSubtaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 汇交子任务表 前端控制器
 * </p>
 *
 * @author hzl
 * @since 2025-04-02
 */
@RestController
@RequestMapping("/deliveryTaskBatchSubtask")
public class DeliveryTaskBatchSubtaskController {

    @Autowired
    private IDeliveryTaskBatchSubtaskService subtaskService;

    /**
     * 子任务-列表查询
     * @param batchId
     * @return
     */
    @GetMapping("/list")
    public ResultBean<List<SubtaskVO>> queryList(@RequestParam(required = true,value = "批次列表id") String batchId) {
        return ResultBean.success(subtaskService.queryList(batchId));
    }

    /**
     * 子任务-详情
     * @param id
     * @return
     */
    @GetMapping("/detail")
    public ResultBean<SubtaskInfoVO> detail(@RequestParam(required = true, value = "子任务列表id") String id) {
        return ResultBean.success(subtaskService.detail(id));
    }

}
